package oa.struts.action;

import javax.annotation.Resource;

import org.junit.Test;
import org.springframework.stereotype.Controller;

import oa.domain.Person;
import oa.service.PersonService;

import com.opensymphony.xwork2.ActionSupport;

@Controller("personAction")
public class PersonAction extends ActionSupport{

	@Resource(name="personService")
	private PersonService personService;

	public PersonService getPersonService() {
		return personService;
	}

	public void setPersonService(PersonService personService) {
		this.personService = personService;
	}
	
	public String testSavePerson()
	{
		Person person = new Person();
		person.setName("cc");
		this.personService.savePerson(person);
		return null;
	}
	
}
